#include "SourceTerminal.h"

SourceTerminal::SourceTerminal(Node* parent) : Terminal (parent) { }

void SourceTerminal::propagateValue() {
  for (std::list<Terminal*>::iterator it = sinks.begin();it!=sinks.end();++it) {
    Terminal* sink = *it;
    sink->setValue(value);
  }
}

void SourceTerminal::connectSink(Terminal* sink) {
  sinks.push_back(sink);
}
